<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/6
 * Time: 17:15
 */
namespace app\admin\validate;

use think\Validate;

class Config extends Validate
{
    protected $rule = [
        'cname' => 'require|max:50|unique:set',
        'ename' => 'require|max:50|unique:set',


    ];

    protected $message = [
        'cname.require' => '中文名称不得为空',
        'cname.unique' => '中文名称不得重复',
        'ename.require' => '英文名称不得重复',
        'ename.unique' => '英文名称不得重复',
    ];

    protected $scene = [
        'add' => ['cname','ename'],
    ];
}